using Markdig;
using Markdig.Syntax;
using MdDoc.Commons;
using NUnit.Framework;
using System.Threading.Tasks;

namespace NUnitTestMdDoc
{
    public class Tests
    {
        [SetUp]
        public void Setup()
        {
        }

        [Test]
        public async Task MarkdownParseAsync()
        {
            string content = await FileHelper.GetContentAsync("Files/README.md");
            MarkdownDocument md = Markdown.Parse(content);
            for (int i = 0; i < md.Count; i++)
            {
                Block blok = md[i];
                System.Console.WriteLine(blok.ToPositionText());
            }
            Assert.Pass();
        }
        [Test]
        public async Task MarkdownTestAsync()
        {
            string content = await FileHelper.GetContentAsync("Files/README.md");
            var html= Markdown.ToHtml(content);
            System.Console.WriteLine(html);
        }
    }
}